import 'package:casdon/modules/lifeCircle/data/model/life_topic_module.dart';

class LifeTopicSearchState {
  final List<LifeTopicModule> data;
  final int pageNum;
  final int totalSize;

  LifeTopicSearchState copyWith({
    List<LifeTopicModule>? data,
    int? pageNum,
    int? totalSize,
  }) {
    return LifeTopicSearchState(
      data: data ?? this.data,
      pageNum: pageNum ?? this.pageNum,
      totalSize: totalSize ?? this.totalSize,
    );
  }

  factory LifeTopicSearchState.initial() =>
      LifeTopicSearchState(data: [], pageNum: 0, totalSize: 0);

  LifeTopicSearchState({
    this.pageNum = 0,
    required this.data,
    required this.totalSize,
  });
}
